// Copyright (c) Lawrence Livermore National Security, LLC and other VisIt
// Project developers.  See the top-level LICENSE file for dates and other
// details.  No copyright assignment is required to contribute to VisIt.

#ifndef QVISEXTRUDESTACKEDWINDOW_H
#define QVISEXTRUDESTACKEDWINDOW_H

#include <QvisOperatorWindow.h>
#include <AttributeSubject.h>

class ExtrudeStackedAttributes;
class QButtonGroup;
class QCheckBox;
class QGroupBox;
class QLabel;
class QLineEdit;
class QPushButton;
class QRadioButton;
class QTreeWidget;
class QTreeWidgetItem;
class QvisVariableButton;

// ****************************************************************************
// Class: QvisExtrudeStackedWindow
//
// Purpose:
//    Defines QvisExtrudeStackedWindow class.
//
// Notes:      Autogenerated by xml2window.
//
// Programmer: xml2window
// Creation:   omitted
//
// Modifications:
//
// ****************************************************************************

class QvisExtrudeStackedWindow : public QvisOperatorWindow
{
    Q_OBJECT
  public:
    QvisExtrudeStackedWindow(const int type,
                         ExtrudeStackedAttributes *subj,
                         const QString &caption = QString(),
                         const QString &shortName = QString(),
                         QvisNotepadArea *notepad = 0);
    virtual ~QvisExtrudeStackedWindow();
    virtual void CreateWindowContents();

  protected:
    void UpdateWindow(bool doAll);
    virtual void GetCurrentValues(int which_widget);

  private slots:
    void axisProcessText();
    void lengthProcessText();
    void stepsProcessText();
    void preserveOriginalCellNumbersChanged(bool val);

    void variableGroupChanged(bool val);
    void addVariable(const QString &variableToAdd);
    void deleteVariable();
    void moveVariableUp();
    void moveVariableDown();
    void variableSelected(QTreeWidgetItem*);
    void resetVariableExtents();
    void variableMinValueChanged(const QString &val);
    void variableMaxValueChanged(const QString &val);
    void variableScaleValueChanged(const QString &val);
    void variableValueProcessText();
    void variableDisplayChanged(int val);

  private:
    int GetSelectedVariableIndex();

    QLabel *axisLabel {nullptr};
    QLineEdit *axis {nullptr};

    QGroupBox          *variableGroup {nullptr};
    QTreeWidget        *variableTree {nullptr};
    QvisVariableButton *variableAddButton {nullptr};
    QPushButton        *variableDeleteButton {nullptr};
    QPushButton        *variableUpButton {nullptr};
    QPushButton        *variableDownButton {nullptr};
    QPushButton        *variableResetExtentsButton {nullptr};
    QLabel             **variableDisplayLabel {nullptr};
    QWidget            *variableDisplay {nullptr};
    QGroupBox          *variableDisplayGroup {nullptr};
    QButtonGroup       *variableDisplayButtonGroup {nullptr};
    QRadioButton       *variableDisplayTypeIndex {nullptr};
    QRadioButton       *variableDisplayTypeValue {nullptr};

    QLabel             *variableMinValLabel {nullptr};
    QLineEdit          *variableMinVal {nullptr};
    QLabel             *variableMaxValLabel {nullptr};
    QLineEdit          *variableMaxVal {nullptr};
    QLabel             *variableScaleValLabel {nullptr};
    QLineEdit          *variableScaleVal {nullptr};

    QGroupBox          *fixedGroup {nullptr};
    QLabel             *lengthLabel {nullptr};
    QLineEdit          *length {nullptr};
    QLabel             *stepsLabel {nullptr};
    QLineEdit          *steps {nullptr};

    QCheckBox *preserveOriginalCellNumbers {nullptr};

    ExtrudeStackedAttributes *atts {nullptr};
};

#endif
